<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/comm/mytags.jsp" %>
<!DOCTYPE>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>找回密码</title>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" href="${ctx}/static/wxcss/apple.css">
    <link rel="stylesheet" href="${ctx}/static/wxcss/index.css">
    <script type="text/javascript" src="${ctx}/static/js/jquery-1.8.3.js"></script>
</head>
<body >
<div class="header gradient_bg">
    <div class="header_logo">
        <a onclick="window.history.back()" class="header_back"> &lt </a>
        <span>找回密码</span>
    </div>
</div>

<!--注册-->

<div class="login_div">
    <span class="login_ltext">手机号</span>
    <input class="login_input" type="tel" maxlength="11" placeholder="输入手机号"/>
</div>
<div class="login_div">
    <span class="login_ltext">验证码</span>
    <div class="auth_div">
        <input class="login_input auth_input" type="tel" maxlength="4" placeholder="输入验证码" />
        <div class="get_auth_code">
            <span>获取验证码</span>
        </div>
    </div>
</div>
<div class="login_div">
    <span class="login_ltext">密码</span>
    <input class="login_input" type="password" maxlength="11" placeholder="设置您的新密码"/>
</div>
<div class="register_action"  >
    <span >找回密码</span>
</div>
<div class="register_div">
    <a href="${ctx}/wxLogin" class="register_text"  >
        已找回，去登录
    </a>
</div>

<script>
    $(function () {
        //获取所有的输入框
        var flag = true;//是否全部输入  默认true
        $(".login_input").keyup(function(){
            registerBtnShow();
        });
        function registerBtnShow() {
            $(".login_input").each(function () {
                if($(this).val()==""){
                    flag = true;
                    return false
                }else{
                    flag=false;
                }
            });
            if(flag){
                $(".register_action").removeClass("gradient_bg");
            }else{
                $(".register_action").addClass("gradient_bg");
            }
        }

        // 验证码倒计时
        var validCode=true;
        $(".get_auth_code").click (function  () {
            var time=30;
            var $code=$(this);
            $code.html(time+"秒");
            if (validCode) {
                validCode=false;
                var codeTimer=setInterval(function  () {
                    time--;
                    $code.html(time+"秒");
                    if (time==0) {
                        clearInterval(codeTimer);
                        $code.html("重新获取");
                        validCode=true;
                    }
                },1000)
            }
        })
    })
</script>
</body>
</html>
